<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String serverName = request.getServerName();
	if (path != null && path.equals("/")) {
		path = "";
	}
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
			
   if(request.getAttribute("loginMsg")!=null&&!request.getAttribute("loginMsg").equals("")){
 %>
 <script type="text/javascript">
     alert('<%=request.getAttribute("loginMsg")%>');
 </script>
 <%  
   }
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Login：东方通-TongTech 网站后台管理</title>
		<style type="text/css">
<!--
.center {
	margin-right: auto;
	margin-left: auto;
	padding: 0px;
	margin-top: 0px;
	margin-bottom: 0px;
}

body {
	margin: 0px;
	background-color: #fcfefc;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
	text-decoration: none;
}

.center .login {
	background-color: #FFFFFF;
	height: 220px;
	width: 420px;
	border: 1px dashed #CCCCCC;
	margin-right: auto;
	margin-left: auto;
	margin-top: 30px;
	margin-bottom: 30px;
}

.text {
	border: 1px solid #CCC;
	height: 18px;
	margin: 1px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #666;
	line-height: 18px;
	padding-top: 2px;
	vertical-align: middle;
}

.button {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	line-height: 20px;
	font-weight: bold;
	color: #FFFFFF;
	margin: 1px;
	height: 23px;
	width: 70px;
	border: 1px solid #CADFE9;
	background-color: #069;
	padding: 0px;
	vertical-align: middle;
}
-->

</style>
<script src="<%=basePath%>js/jquery-1.5.1.min.js"  type="text/javascript" ></script>
		<script type="text/javascript">
		window.onload = function(){
			if(window.frameElement==null) {
				return;
			} else { 
				window.parent.location.href = "<%=basePath%>admin/login.jsp";
			}
		}
		</script>
	</head>

	<body>
		<center>
			<div class="top"></div>
			<div class="center">
				<div class="login">
					<form action="<%=basePath%>manager/admin/login.do" id="logfrm" method="post">

						<table width="543" border="0" align="center" cellpadding="0"
							cellspacing="0" background="<%=basePath%>images/login.jpg">
							
							<tr>
								<td width="523" height="387" align="center" valign="top">
									<table width="100%" border="0">
										<tr>
											<td width="49%" height="122" align="right" valign="top">
												<a href="<%=basePath%>"
													style="display: block; float: right; height: 80px; width: 220px;"></a>
											</td>
											<td width="51%" align="right" valign="top">
												<a href="javascript:window.close()"
													style="display: block; float: right; height: 40px; width: 60px;"></a>
											</td>
										</tr>
									</table>

									<table width="358" height="219" border="0" align="center"
										cellpadding="0" cellspacing="0">
										<tr>
											<td width="67" height="79">
												&nbsp;
											</td>
											<td width="291" align="left" valign="bottom">
												<label>
													<input type="text"  name="username" id="username"
													value="${requestScope.formMap.username[0]}" class="text"
														style="border: 1px solid #ccc; width: 200px;"  />
												</label>
											</td>
										</tr>
										<tr>
											<td height="24">
												&nbsp;
											</td>

											<td align="left">
												&nbsp;
											</td>
										</tr>
										<tr>
											<td height="35">
												&nbsp;
											</td>
											<td align="left" valign="bottom">
												<input type="password"   type="password" name="password" id="password"
													value="${requestScope.formMap.password[0]}" class="text"
													style="border: 1px solid #ccc; width: 200px;" />
											</td>
										</tr>
										 
										<tr>
											<td height="48" colspan="2">
												<table width="358" border="0" cellpadding="0"
													cellspacing="0">
													<tr>
														<td height="46" align="center" valign="top">
															<img src="<%=basePath%>images/cmd.gif"  id="logincmd" name="logincmd" width="97"
																height="26" id="logincmd" style="cursor: pointer;" onclick=""/>
														</td>
														<td align="center" valign="top">
															<img src="<%=basePath%>images/cmd.gif" style="cursor: pointer;"
																width="108" height="31"
																onclick="window.location.reload()" />
														</td>
													</tr>
												</table>
											</td>
										</tr>
									
								</td>
							</tr>
						</table>


					</form>
					
<script type="text/javascript">
$(function(){
  $("#logincmd").click(function(){
   var u=$("#username").attr("value");
   var p=$("#password").attr("value");
   if(u=='' || p==''){
  alert('请输入用户名或密码');
   }else{
    $("#logfrm").submit();
  }
  });
});
</script>
				</div>
			</div>
		 
		</center>
	</body>
</html>
